from flask import Flask


import leancloud

leancloud.init("jbPWPAXP6oENAt96buuosHaT-gzGzoHsz", "EBYmfQolwjMu7lLNqy8TedhQ")

TestObject = leancloud.Object.extend('TestObject')
test_object = TestObject()
test_object.set('words', "Hello python!")
test_object.save()

# 声明 class
Todo = leancloud.Object.extend('Todo')

# 构建对象
todo = Todo()

# 为属性赋值
todo.set('title',   '工程师周会')
todo.set('content', '周二两点，全体成员')

# 将对象保存到云端
todo.save()

app = Flask(__name__)


@app.route('/')
def hello_world():
    return 'Hello Python!'


if __name__ == '__main__':
    app.run()


